﻿using Loki.Bot.Logic.Behaviors;
using Loki.Bot.Pathfinding;
using Loki.TreeSharp;

namespace toNyxPhysRanger
{
    class Composites
    {

        #region LOS/Movement

        internal static Composite CreateMoveIntoRange(float range)
        {
            //// Using some new stuff from the bot!
            //return new ActionRunCoroutine(() => GetInRangeCoroutine(range));

            return new Decorator(ret => Target.BestTarget.PathDistance() > range /*|| !BestTarget.IsInLineOfSight*/,
                CommonBehaviors.MoveTo(ret => Target.BestTarget.Position, ret => "CreateMoveIntoRange"));
        }

        #endregion

    }
}
